package com.miaozhen.utils;

import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.hadoop.fs.Path;
import org.apache.hadoop.mapreduce.*;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.input.FileSplit;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;

public class MzSequenceFileInputFormat extends FileInputFormat<LongWritable,Text> {

    protected boolean isSplitable(JobContext job, Path file) {
        return false;
    }

    public RecordReader<LongWritable,Text> createRecordReader(InputSplit split,
                                                              TaskAttemptContext context)
            throws IOException {
        return new MzSequenceFileRecordReader(context.getConfiguration(), (FileSplit) split);
    }
}
